<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

/**
 * @see \Magento\Paypal\Block\Adminhtml\System\Config\ApiWizard
 * @var \Magento\Paypal\Block\Adminhtml\System\Config\ApiWizard $block
 */
?>
<div class="pp-buttons-container">
    <div dir="ltr" style="text-align: left;" trbidi="on">
        <script>
            (function(d, s, id){
                var js, ref = d.getElementsByTagName(s)[0];
                if (!d.getElementById(id)){
                    js = d.createElement(s); js.id = id; js.async = true;
                    js.src = "https://www.paypal.com/webapps/merchantboarding/js/lib/lightbox/partner.js";
                    ref.parentNode.insertBefore(js, ref); }
            }(document, "script", "paypal-js"));
        </script>

        <a class="action-default"
           data-paypal-button="true"
           href="<?php /* @noEscape */ echo $block->escapeUrl($block->getButtonUrl() . '?' . $block->getQuery()); ?>"
           target="PPFrame"><?php echo $block->escapeHtml($block->getButtonLabel()); ?></a>

        <a class="action-default"
           data-paypal-button="true"
           href="<?php
               /* @noEscape */ echo $block->escapeUrl($block->getSandboxButtonUrl(). '?' . $block->getQuery());
           ?>"
           target="PPFrame"><?php echo $block->escapeHtml($block->getSandboxButtonLabel()); ?></a>
    </div>
</div>
